package com.cssw.fyzb.core.dao.turntable;

import com.cssw.fyzb.core.model.dodb.Turntable;
import com.cssw.fyzb.core.model.dodb.TurntableNumPrice;
import com.cssw.fyzb.core.model.dodb.User;
import com.ydn.dbframe.plugin.activerecord.Page;
import com.ydn.dbframe.plugin.activerecord.parse.SqlParse;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class TurntableNumPriceDaoImpl implements TurntableNumPriceDao {

    @Override
    public List<TurntableNumPrice> findAll() {
        return TurntableNumPrice.dao.findAll();
    }

    @Override
    public List<TurntableNumPrice> list() {
        StringBuffer sql = new StringBuffer();
        sql.append("select * from t_turntable_num_price order by sort ");
        return TurntableNumPrice.dao.find(sql.toString());
    }

    @Override
    public TurntableNumPrice getByNum(Integer num) {
        StringBuffer sql = new StringBuffer();
        sql.append("select * from t_turntable_num_price where num = ? ");
        return TurntableNumPrice.dao.findFirst(sql.toString(), num);
    }

}

